package com.ld.security.auth.common.sys.vo;

import com.ld.security.auth.common.sys.entity.SysUserEntity;
import com.ld.security.common.core.base.SuperVo;
import com.ld.security.common.mybatis.anno.QueryKey;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.constant.SqlCondition;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class UserMapVo implements SuperVo {

    private List<String> ids;

    @QueryKey(groupKey = "id")
    @SqlKey(name = "id",valueField = "ids",value = SqlCondition.in)
    private Map<String,SysUserEntity> userMap;

    public UserMapVo(List<String> ids) {
        this.ids = ids;
    }

    public SysUserEntity getUser(String id){
        return userMap.get(id);
    }
}
